import request from '@/utils/request'
import md5 from 'js-md5'
export function login(data) {
  data.password = md5(data.password + 'guiplan') // 密码md5加密
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}
